<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class SensapilityService</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class SensapilityService</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|													<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">version:</span> 0.1</li>
				<li><span class="field">author:</span> api.jmatt@gmail.com</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_sensapilityservice.php.html">/sensapilityservice.php</a> (line <span class="field">28</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../default/SensapilityChannel.html">SensapilityChannel</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../default/SensapilityAfs.html">SensapilityAfs</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../default/SensapilitySiteFilter.html">SensapilitySiteFilter</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../default/SensapilityReport.html">SensapilityReport</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../default/SensapilityAccount.html">SensapilityAccount</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../default/SensapilityAfc.html">SensapilityAfc</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../default/SensapilityReferral.html">SensapilityReferral</a></td>
					<td>
											
										</td>
				</tr>
							</table>
		</div>
	</div>



	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																				
												<div class="method-definition">
											<span class="method-result">none</span>
										<a href="#SensapilityService" title="details" class="method-name">SensapilityService</a>
											(<span class="var-type">soapclientnusoap</span>&nbsp;<span class="var-name">$soapClient</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$namespaces</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$defaultNamespaceLabel</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#checkForFailure" title="details" class="method-name">checkForFailure</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$callResults</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#computeDepth" title="details" class="method-name">computeDepth</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$target</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#deepenArray" title="details" class="method-name">deepenArray</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$tooShallow</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$increaseDepthBy</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#doSoapCall" title="details" class="method-name">doSoapCall</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$callName</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$parameters</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$defaultNamespace</span>, <span class="var-type">boolean</span>&nbsp;<span class="var-name">$hasReturn</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$returnArrayDepth</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$verboseModeActive</span> = <span class="var-default">true</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#formatError" title="details" class="method-name">formatError</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#formatFault" title="details" class="method-name">formatFault</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$callResults</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getHeaders" title="details" class="method-name">getHeaders</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#getLastCallError" title="details" class="method-name">getLastCallError</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">none</span>
										<a href="#setHeaders" title="details" class="method-name">setHeaders</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$newHeaders</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodSensapilityService" id="SensapilityService"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor SensapilityService</span> (line <span class="line-number">61</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor for the SensaAPIlity service wrapper object</p>
	
	<div class="method-signature">
		<span class="method-result">none</span>
		<span class="method-name">
			SensapilityService
		</span>
					(<span class="var-type">soapclientnusoap</span>&nbsp;<span class="var-name">$soapClient</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$namespaces</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$defaultNamespaceLabel</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">soapclientnusoap</span>
				<span class="var-name">$soapClient</span><span class="var-description">: the NuSOAP object that communicates  with the service</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$namespaces</span><span class="var-description">: associative array that matches namespace labels  to namespace URIs</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$defaultNamespaceLabel</span><span class="var-description">: the namespace to be used with most  tags</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcheckForFailure" id="checkForFailure"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">checkForFailure</span> (line <span class="line-number">117</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks the soap call result to see if it is an error</p>
	<ul class="tags">
				<li><span class="field">return:</span> returns false if there is no error, otherwise returns the  error that can be printed or returned.</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			checkForFailure
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$callResults</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$callResults</span><span class="var-description">: the result of a request to a SOAP service</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcomputeDepth" id="computeDepth"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">computeDepth</span> (line <span class="line-number">221</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Determine the depth of the nested arrays. Look at the first item  in each array to see if it itself is an array.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the depth of the target</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			computeDepth
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$target</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$target</span><span class="var-description">: the primitive or object to inspect</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddeepenArray" id="deepenArray"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">deepenArray</span> (line <span class="line-number">241</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Nest the array by the specified amount.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the same object nested in $increaseDepthBy levels of arrays</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			deepenArray
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$tooShallow</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$increaseDepthBy</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$tooShallow</span><span class="var-description">: the array or object tree to deepend</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$increaseDepthBy</span><span class="var-description">: How many levels should be added to the tree</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddoSoapCall" id="doSoapCall"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">doSoapCall</span> (line <span class="line-number">158</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Handles doing the actual SOAP call, detecting errors, saving error  and doing proper return.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the result of the call or null if the call failed</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			doSoapCall
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$callName</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$parameters</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$defaultNamespace</span>, <span class="var-type">boolean</span>&nbsp;<span class="var-name">$hasReturn</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$returnArrayDepth</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$verboseModeActive</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$callName</span><span class="var-description">: the SOAP method to call</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$parameters</span><span class="var-description">: the XML parameters to pass to the call</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$defaultNamespace</span><span class="var-description">: the namespace to make the call in</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$hasReturn</span><span class="var-description">: whether this call is expected to return anything</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$returnArrayDepth</span><span class="var-description">: the depth of the return array <ol><li>- if there is no return value or the return is a string</li><li>- if the return is an array or object</li><li>- if the return is an array or object whose first member is an array</li></ol> or object  3,4,5... - if the arrays or objects continue to nest</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$verboseModeActive</span><span class="var-description">: whether to print out errors</span>			</li>
				</ul>
		
			
	</div>
<a name="methodformatError" id="formatError"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">formatError</span> (line <span class="line-number">107</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Formats communications error messages (eg. 404, 403)</p>
	<ul class="tags">
				<li><span class="field">return:</span> the pretty formatted message to print</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			formatError
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodformatFault" id="formatFault"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">formatFault</span> (line <span class="line-number">95</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Formats SOAP exceptions for printing</p>
	<ul class="tags">
				<li><span class="field">return:</span> the pretty formatted message to print</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			formatFault
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$callResults</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$callResults</span><span class="var-description">: the result of a request to a SOAP service</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetHeaders" id="getHeaders"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getHeaders</span> (line <span class="line-number">138</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> the current headers for this service object</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getHeaders
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetLastCallError" id="getLastCallError"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getLastCallError</span> (line <span class="line-number">256</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the error of the last call, if there was one</p>
	<ul class="tags">
				<li><span class="field">return:</span> null if there was no error, an array with keys 'code',  'type', and 'message' if there was</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			getLastCallError
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetHeaders" id="setHeaders"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setHeaders</span> (line <span class="line-number">86</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets headers on the underlying soapclientnusoap object</p>
	
	<div class="method-signature">
		<span class="method-result">none</span>
		<span class="method-name">
			setHeaders
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$newHeaders</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$newHeaders</span><span class="var-description">: the headers to use with calls to this service</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 25 May 2007 13:35:29 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.1</a>
	</p>
	</div></body>
</html>